<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:fb="http://www.facebook.com/2008/fbml">
<div id="simpleLoginPanel">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal">×</button>
		<h3 id="myModalLabel">
			<g:message code="auth.login.title" />
		</h3>
	</div>
	<div class="modal-body">

		<h5 class="fl">
			<g:message code="auth.login.with.facebook" />
			&nbsp;&nbsp;
		</h5>
		<fb:login-button class="facebookLoginButton"
			scope="email,publish_stream"
			onlogin="facebookLogin();">
			<g:message code="auth.login.facebook" />
		</fb:login-button>
		
		<div class="cleaner"></div>
		
		<div id="facebookLoggedInUserInfoInLogin" class="profileFacebookButtons">
			<div class="fl">${message(code: 'auth.login.facebook.connected.user1')}<span id="facebookLoggedInUserNameInLogin"></span>${message(code: 'auth.login.facebook.connected.user2')}</div>
			<a class="fl" href="#" onclick="logoutSesionFB(); $('#facebookLoggedInUserInfoInLogin').remove();">
				<g:message code="auth.login.facebook.connected.user3"/></a>
		</div>

		<hr></hr>

		<g:render template="/user/siteLogin" />
	</div>

	<div class="cleaner"></div>

	<div class="modal-footer">
		<g:message code="auth.login.new.user" />
		<a data-toggle="modal" href="#siteSigninModal" class="btn"
			data-dismiss="modal"><g:message code="auth.login.new.user.now" /></a>
	</div>
</div>
<script type="text/javascript">
		jQuery(document).ready(function() {

			if (!"${user?.facebookUid}") {
				setFacebookUsername('facebookLoggedInUserNameInLogin')
			} else {
				$("#facebookLoggedInUserInfoInLogin").remove();
			}
		});
</script>
</html>